<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="../../../layui/css/layui.css">
</head>
<body>
<form class="layui-form" action="javascript:;" id="form-process">
<!--  <input  style="display: none" type="text" id="aid" name="aid" autocomplete="off" class="layui-input">-->
  <div class="layui-form-item">
    <label class="layui-form-label">用户姓名</label>
    <div class="layui-input-block">
      <input type="text" id="name" name="name" placeholder="" autocomplete="off" class="layui-input" style="border-style:none" readonly>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">封停天数</label>
    <div class="layui-input-block">
      <input type="radio" name="bannum" value="10" title="封停10天">
      <input type="radio" name="bannum" value="20" title="封停20天">
      <input type="radio" name="bannum" value="30" title="封停30天">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">反馈详情</label>
    <div class="layui-input-block">
      <textarea name="banreason" required lay-verify="required" placeholder="请输入反馈内容" class="layui-textarea" style="width: 400px;height: 300px"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">取消</button>
    </div>
  </div>
</form>
<script src="../../../js/jquery-3.6.0.js"></script>
<script src="../../../layui/layui.js"></script>
<script>
  layui.use('form', function () {
    var form = layui.form;
    form.on('submit(formDemo)', function (data) {
      $.ajax({
        url: "/advanced/addmanagerlistban",
        type: "POST",
        data: $("#form-process").serialize(),
        dataType: "json",
        success: function (res) {
          console.log(res)
          if (res.state == 200) {
            parent.refresh1();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
          }
        }
      })
    })
  });
</script>
</body>
</html>
